import MSData
import ReaderSecDB
import MSLogger
import urllib

import time

MSLogger.logInit('C:\\safe\\ms.new.log', 5, True)
reader = ReaderMSDB.Reader('Securithor', 'postgres')
reader.forceConnection()

while True:
    events = reader.readEvents_Processing()
    for e in events:
        url = 'http://safeinside-car.ru/group/reload.php?id=%s&lat=34&lon=59' % (str(e))
        urllib.urlopen(url)
    time.sleep(5)

